<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/29
 * Time: 10:12
 */

namespace vendor;

use vendor\core\dog;
use vendor\core\order;
use vendor\core\commonOrder;
use vendor\core\integralOrder;

require 'core\order.php';

$order1 = new order();
echo '用户ID: ' . $order1->userId;
echo '<br />';
$order1->createOrder();

$funName = 'createOrder';
echo '99<br />';
$order1->$funName();
echo '99<br />';
call_user_func_array([$order1, $funName], []);

echo '99<br />';

$order2 = new order(56);
echo '用户ID: ' . $order2->userId;
echo '<br />';
$order2->createOrder();


//require 'core\commonOrder.php';
//require 'core\integralOrder.php';
//$comorder = new commonOrder(12);
//$comorder->createOrder();
//$comorder->pay();
//////
//echo '<br />';
////
//$inteorder = new integralOrder(10);
//echo $inteorder->userId;
//$inteorder->createOrder();
//$inteorder->pay();


//开始清除对象
//................................

//$result = call_user_func(function ($arg) {
//    print "[$arg]\n";
//}, 'test'); /* As of PHP 5.3.0 */
//
//
//var_dump($result);

echo '<br />';

include  'core\dog.php';
$dog = new dog();